home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / MorphOS / cvs-1.11.2 / source / amiga.diffs next >
Encoding:
Text File  |  2002-11-18  |  36.1 KB  |  1,461 lines

  1. Index: diff/system.h
  2. ===================================================================
  3. RCS file: /cvs/ccvs/diff/system.h,v
  4. retrieving revision 1.7
  5. diff -c -r1.7 system.h
  6. *** diff/system.h    9 Aug 2001 19:55:58 -0000    1.7
  7. --- diff/system.h    9 Nov 2002 18:46:46 -0000
  8. ***************
  9. *** 27,32 ****
  10. --- 27,36 ----
  11.   #include <sys/types.h>
  12.   #include <sys/stat.h>
  13.   
  14. + #if defined(AMIGA) && defined(__SASC)
  15. + typedef int ssize_t;
  16. + #endif /* AMIGA */
  17.   /* Note that PARAMS is just internal to the diff library; diffrun.h
  18.      has its own mechanism, which will hopefully be less likely to
  19.      conflict with the library's caller's namespace.  */
  20. ***************
  21. *** 280,290 ****
  22.     }
  23.   #endif
  24.   
  25.   /* these come from CVS's lib/system.h, but I wasn't sure how to include that
  26.    * properly or even if I really should
  27.    */
  28.   #ifndef CVS_OPENDIR
  29. ! #define CVS_OPENDIR opendir
  30.   #endif
  31.   #ifndef CVS_READDIR
  32.   #define CVS_READDIR readdir
  33. --- 284,298 ----
  34.     }
  35.   #endif
  36.   
  37. + #ifdef AMIGA
  38. + #include "amiga.h"
  39. + #endif /* AMIGA */
  40.   /* these come from CVS's lib/system.h, but I wasn't sure how to include that
  41.    * properly or even if I really should
  42.    */
  43.   #ifndef CVS_OPENDIR
  44. ! #define CVS_OPENDIR amiga_opendir
  45.   #endif
  46.   #ifndef CVS_READDIR
  47.   #define CVS_READDIR readdir
  48. Index: lib/getopt.c
  49. ===================================================================
  50. RCS file: /cvs/ccvs/lib/getopt.c,v
  51. retrieving revision 1.5
  52. diff -c -r1.5 getopt.c
  53. *** lib/getopt.c    2 Jan 1997 19:07:41 -0000    1.5
  54. --- lib/getopt.c    9 Nov 2002 18:47:51 -0000
  55. ***************
  56. *** 66,71 ****
  57. --- 66,75 ----
  58.   #include <stdlib.h>
  59.   #endif    /* GNU C library.  */
  60.   
  61. + #ifdef AMIGA
  62. + #include <stdlib.h>
  63. + #endif /* AMIGA */
  64.   /* This version of `getopt' appears to the caller like standard Unix `getopt'
  65.      but it behaves differently for the user, since it allows the user
  66.      to intersperse the options with the other arguments.
  67. Index: lib/getopt.h
  68. ===================================================================
  69. RCS file: /cvs/ccvs/lib/getopt.h,v
  70. retrieving revision 1.4
  71. diff -c -r1.4 getopt.h
  72. *** lib/getopt.h    26 Mar 1999 15:47:21 -0000    1.4
  73. --- lib/getopt.h    9 Nov 2002 18:47:51 -0000
  74. ***************
  75. *** 97,103 ****
  76. --- 97,107 ----
  77.      exactly why), and there is no particular need to prototype it.
  78.      We really shouldn't be trampling on the system's namespace at all by
  79.      declaring getopt() but that is a bigger issue.  */
  80. + #ifdef AMIGA
  81. + extern int getopt (int argc, char * const *argv, const char *optstring);
  82. + #else
  83.   extern int getopt ();
  84. + #endif
  85.   
  86.   extern int getopt_long (int argc, char *const *argv, const char *shortopts,
  87.                   const struct option *longopts, int *longind);
  88. Index: lib/regex.c
  89. ===================================================================
  90. RCS file: /cvs/ccvs/lib/regex.c,v
  91. retrieving revision 1.11
  92. diff -c -r1.11 regex.c
  93. *** lib/regex.c    19 Jun 2000 16:45:24 -0000    1.11
  94. --- lib/regex.c    9 Nov 2002 18:48:01 -0000
  95. ***************
  96. *** 144,151 ****
  97. --- 144,156 ----
  98.   
  99.   static char re_syntax_table[CHAR_SET_SIZE];
  100.   
  101. + #ifdef AMIGA
  102. + static void
  103. + init_syntax_once (void)
  104. + #else
  105.   static void
  106.   init_syntax_once ()
  107. + #endif /* AMIGA */
  108.   {
  109.      register int c;
  110.      static int done = 0;
  111. ***************
  112. *** 358,364 ****
  113.   #define false 0
  114.   #define true 1
  115.   
  116. ! static int re_match_2_internal ();
  117.   
  118.   /* These are the command codes that appear in compiled regular
  119.      expressions.     Some opcodes are followed by argument bytes.  A
  120. --- 363,376 ----
  121.   #define false 0
  122.   #define true 1
  123.   
  124. ! #ifdef AMIGA
  125. ! static int re_match_2_internal(struct re_pattern_buffer *bufp, const char *string1,
  126. !                                int size1, const char *string2, int size2, int pos,
  127. !                                struct re_registers *regs, int stop);
  128. ! #else
  129. ! static int re_match_2_internal ()
  130. ! #endif /* AMiGA */
  131.   
  132.   /* These are the command codes that appear in compiled regular
  133.      expressions.     Some opcodes are followed by argument bytes.  A
  134. ***************
  135. *** 540,548 ****
  136.   
  137.   #ifdef DEBUG
  138.   static void
  139.   extract_number (dest, source)
  140. !     int *dest;
  141.       unsigned char *source;
  142.   {
  143.     int temp = SIGN_EXTEND_CHAR (*(source + 1));
  144.     *dest = *source & 0377;
  145. --- 552,564 ----
  146.   
  147.   #ifdef DEBUG
  148.   static void
  149. + #ifdef AMIGA
  150. + extract_number (int *dest, unsigned char *source)
  151. + #else
  152.   extract_number (dest, source)
  153. !         int *dest;
  154.       unsigned char *source;
  155. + #endif /* AMIGA */
  156.   {
  157.     int temp = SIGN_EXTEND_CHAR (*(source + 1));
  158.     *dest = *source & 0377;
  159. ***************
  160. *** 567,575 ****
  161.   
  162.   #ifdef DEBUG
  163.   static void
  164.   extract_number_and_incr (destination, source)
  165. !     int *destination;
  166.       unsigned char **source;
  167.   {
  168.     extract_number (destination, *source);
  169.     *source += 2;
  170. --- 583,595 ----
  171.   
  172.   #ifdef DEBUG
  173.   static void
  174. + #ifdef AMIGA
  175. + extract_number_and_incr (int *destination, unsigned char **source)
  176. + #else
  177.   extract_number_and_incr (destination, source)
  178. !         int *destination;
  179.       unsigned char **source;
  180. + #endif /* AMIGA */
  181.   {
  182.     extract_number (destination, *source);
  183.     *source += 2;
  184. ***************
  185. *** 1530,1540 ****
  186.   
  187.   /* Subroutine declarations and macros for regex_compile.  */
  188.   
  189.   static void store_op1 (), store_op2 ();
  190. ! static void insert_op1 (), insert_op2 ();
  191.   static boolean at_begline_loc_p (), at_endline_loc_p ();
  192.   static boolean group_in_compile_stack ();
  193.   static reg_errcode_t compile_range ();
  194.   
  195.   /* Fetch the next character in the uncompiled pattern---translating it
  196.      if necessary.  Also cast from a signed character in the constant
  197. --- 1550,1562 ----
  198.   
  199.   /* Subroutine declarations and macros for regex_compile.  */
  200.   
  201. + #ifndef AMIGA
  202.   static void store_op1 (), store_op2 ();
  203. ! static void insert_op1 (), insert_op2();
  204.   static boolean at_begline_loc_p (), at_endline_loc_p ();
  205.   static boolean group_in_compile_stack ();
  206.   static reg_errcode_t compile_range ();
  207. + #endif /* AMIGA */
  208.   
  209.   /* Fetch the next character in the uncompiled pattern---translating it
  210.      if necessary.  Also cast from a signed character in the constant
  211. ***************
  212. *** 1687,1699 ****
  213. --- 1709,1734 ----
  214.   } compile_stack_elt_t;
  215.   
  216.   
  217. + #ifdef AMIGA
  218. + typedef struct compile_stack_type
  219. + #else
  220.   typedef struct
  221. + #endif /* AMIGA */
  222.   {
  223.     compile_stack_elt_t *stack;
  224.     unsigned size;
  225.     unsigned avail;            /* Offset of next open position.  */
  226.   } compile_stack_type;
  227.   
  228. + #ifdef AMIGA
  229. + static void store_op1(re_opcode_t op, unsigned char *loc, int arg);
  230. + static void store_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2);
  231. + static void insert_op1(re_opcode_t op, unsigned char *loc, int arg, unsigned char *end);
  232. + static void insert_op2(re_opcode_t op, unsigned char *loc, int arg1, int arg2, unsigned char *end);
  233. + static boolean at_begline_loc_p(const char *pattern, const char *p, reg_syntax_t syntax);
  234. + static boolean at_endline_loc_p(const char *p, const char *pend, int syntax);
  235. + static boolean group_in_compile_stack(compile_stack_type compile_stack, unsigned regnum);
  236. + #endif /* AMIGA */
  237.   
  238.   #define INIT_COMPILE_STACK_SIZE 32
  239.   
  240. ***************
  241. *** 1809,1816 ****
  242.      but don't make them smaller.     */
  243.   
  244.   static
  245. ! regex_grow_registers (num_regs)
  246. !      int num_regs;
  247.   {
  248.     if (num_regs > regs_allocated_size)
  249.       {
  250. --- 1844,1850 ----
  251.      but don't make them smaller.     */
  252.   
  253.   static
  254. ! regex_grow_registers(int num_regs) /* AMiGA */
  255.   {
  256.     if (num_regs > regs_allocated_size)
  257.       {
  258. ***************
  259. *** 1857,1867 ****
  260. --- 1891,1907 ----
  261.     } while (0)
  262.   
  263.   static reg_errcode_t
  264. + #ifdef AMIGA
  265. + regex_compile (const char *pattern, int size,
  266. +                reg_syntax_t syntax,
  267. +                struct re_pattern_buffer *bufp) /* AMiGA */
  268. + #else
  269.   regex_compile (pattern, size, syntax, bufp)
  270.        const char *pattern;
  271.        int size;
  272.        reg_syntax_t syntax;
  273.        struct re_pattern_buffer *bufp;
  274. + #endif
  275.   {
  276.     /* We fetch characters from PATTERN here.  Even though PATTERN is
  277.        `char *' (i.e., signed), we declare these variables as unsigned, so
  278. ***************
  279. *** 3937,3946 ****
  280.   
  281.   /* Declarations and macros for re_match_2.  */
  282.   
  283.   static int bcmp_translate ();
  284.   static boolean alt_match_null_string_p (),
  285. !            common_op_match_null_string_p (),
  286. !            group_match_null_string_p ();
  287.   
  288.   /* This converts PTR, a pointer into one of the search strings `string1'
  289.      and `string2' into an offset from the beginning of that string.  */
  290. --- 3977,3993 ----
  291.   
  292.   /* Declarations and macros for re_match_2.  */
  293.   
  294. + #ifndef AMIGA
  295.   static int bcmp_translate ();
  296.   static boolean alt_match_null_string_p (),
  297. !              common_op_match_null_string_p (),
  298. !              group_match_null_string_p ();
  299. ! #else
  300. ! static int bcmp_translate(unsigned char *s1, unsigned char *s2, int len, RE_TRANSLATE_TYPE translate);
  301. ! static boolean alt_match_null_string_p(unsigned char *p, unsigned char *end, register_info_type *reg_info);
  302. ! static boolean common_op_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info);
  303. ! static boolean group_match_null_string_p(unsigned char **p, unsigned char *end, register_info_type *reg_info);
  304. ! #endif /* AMIGA */
  305.   
  306.   /* This converts PTR, a pointer into one of the search strings `string1'
  307.      and `string2' into an offset from the beginning of that string.  */
  308. Index: lib/regex.h
  309. ===================================================================
  310. RCS file: /cvs/ccvs/lib/regex.h,v
  311. retrieving revision 1.5
  312. diff -c -r1.5 regex.h
  313. *** lib/regex.h    19 Jun 2000 16:45:24 -0000    1.5
  314. --- lib/regex.h    9 Nov 2002 18:48:01 -0000
  315. ***************
  316. *** 485,493 ****
  317.   #ifdef _REGEX_RE_COMP
  318.   /* 4.2 bsd compatibility.  */
  319.   /* CVS: don't use prototypes: they may conflict with system headers.  */
  320.   extern char *re_comp _RE_ARGS (());
  321.   extern int re_exec _RE_ARGS (());
  322. ! #endif
  323.   
  324.   /* POSIX compatibility.  */
  325.   extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
  326. --- 485,499 ----
  327.   #ifdef _REGEX_RE_COMP
  328.   /* 4.2 bsd compatibility.  */
  329.   /* CVS: don't use prototypes: they may conflict with system headers.  */
  330. + #ifdef AMIGA
  331. + extern char *re_comp _RE_ARGS((const char *s));
  332. + extern int re_exec _RE_ARGS((const char *s));
  333. + #else
  334.   extern char *re_comp _RE_ARGS (());
  335.   extern int re_exec _RE_ARGS (());
  336. ! #endif /* AMIGA */
  337. ! #endif /* _REGEX_RE_COMP */
  338.   
  339.   /* POSIX compatibility.  */
  340.   extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags));
  341. Index: lib/sighandle.c
  342. ===================================================================
  343. RCS file: /cvs/ccvs/lib/sighandle.c,v
  344. retrieving revision 1.7
  345. diff -c -r1.7 sighandle.c
  346. *** lib/sighandle.c    23 Feb 2000 10:11:25 -0000    1.7
  347. --- lib/sighandle.c    9 Nov 2002 18:48:02 -0000
  348. ***************
  349. *** 65,71 ****
  350.   
  351.   /* Define linked list of signal handlers structure */
  352.   struct SIG_hlist {
  353. !     RETSIGTYPE        (*handler)();
  354.       struct SIG_hlist    *next;
  355.   };
  356.   
  357. --- 65,76 ----
  358.   
  359.   /* Define linked list of signal handlers structure */
  360.   struct SIG_hlist {
  361. !   #ifdef AMIGA
  362. !     RETSIGTYPE                (*handler)(int sig);
  363. !   #else
  364. !     RETSIGTYPE                (*handler)();
  365. !   #endif /* AMIGA */
  366.       struct SIG_hlist    *next;
  367.   };
  368.   
  369. Index: lib/system.h
  370. ===================================================================
  371. RCS file: /cvs/ccvs/lib/system.h,v
  372. retrieving revision 1.42
  373. diff -c -r1.42 system.h
  374. *** lib/system.h    15 Feb 2001 02:53:07 -0000    1.42
  375. --- lib/system.h    9 Nov 2002 18:48:04 -0000
  376. ***************
  377. *** 385,403 ****
  378.      can hang their own definitions.  */
  379.   
  380.   #ifndef CVS_ACCESS
  381. ! #define CVS_ACCESS access
  382.   #endif
  383.   
  384.   #ifndef CVS_CHDIR
  385. ! #define CVS_CHDIR chdir
  386.   #endif
  387.   
  388.   #ifndef CVS_CREAT
  389. ! #define CVS_CREAT creat
  390.   #endif
  391.   
  392.   #ifndef CVS_FOPEN
  393. ! #define CVS_FOPEN fopen
  394.   #endif
  395.   
  396.   #ifndef CVS_FDOPEN
  397. --- 385,403 ----
  398.      can hang their own definitions.  */
  399.   
  400.   #ifndef CVS_ACCESS
  401. ! #define CVS_ACCESS amiga_access
  402.   #endif
  403.   
  404.   #ifndef CVS_CHDIR
  405. ! #define CVS_CHDIR amiga_chdir
  406.   #endif
  407.   
  408.   #ifndef CVS_CREAT
  409. ! #define CVS_CREAT amiga_creat
  410.   #endif
  411.   
  412.   #ifndef CVS_FOPEN
  413. ! #define CVS_FOPEN amiga_fopen
  414.   #endif
  415.   
  416.   #ifndef CVS_FDOPEN
  417. ***************
  418. *** 405,415 ****
  419.   #endif
  420.   
  421.   #ifndef CVS_MKDIR
  422. ! #define CVS_MKDIR mkdir
  423.   #endif
  424.   
  425.   #ifndef CVS_OPEN
  426. ! #define CVS_OPEN open
  427.   #endif
  428.   
  429.   #ifndef CVS_READDIR
  430. --- 405,415 ----
  431.   #endif
  432.   
  433.   #ifndef CVS_MKDIR
  434. ! #define CVS_MKDIR amiga_mkdir
  435.   #endif
  436.   
  437.   #ifndef CVS_OPEN
  438. ! #define CVS_OPEN amiga_open
  439.   #endif
  440.   
  441.   #ifndef CVS_READDIR
  442. ***************
  443. *** 421,450 ****
  444.   #endif
  445.   
  446.   #ifndef CVS_OPENDIR
  447. ! #define CVS_OPENDIR opendir
  448.   #endif
  449.   
  450.   #ifndef CVS_RENAME
  451. ! #define CVS_RENAME rename
  452.   #endif
  453.   
  454.   #ifndef CVS_RMDIR
  455. ! #define CVS_RMDIR rmdir
  456.   #endif
  457.   
  458.   #ifndef CVS_STAT
  459. ! #define CVS_STAT stat
  460.   #endif
  461.   
  462.   /* Open question: should CVS_STAT be lstat by default?  We need
  463.      to use lstat in order to handle symbolic links correctly with
  464.      the PreservePermissions option. -twp */
  465.   #ifndef CVS_LSTAT
  466. ! #define CVS_LSTAT lstat
  467.   #endif
  468.   
  469.   #ifndef CVS_UNLINK
  470. ! #define CVS_UNLINK unlink
  471.   #endif
  472.   
  473.   /* Wildcard matcher.  Should be case-insensitive if the system is.  */
  474. --- 421,450 ----
  475.   #endif
  476.   
  477.   #ifndef CVS_OPENDIR
  478. ! #define CVS_OPENDIR amiga_opendir
  479.   #endif
  480.   
  481.   #ifndef CVS_RENAME
  482. ! #define CVS_RENAME amiga_rename
  483.   #endif
  484.   
  485.   #ifndef CVS_RMDIR
  486. ! #define CVS_RMDIR amiga_rmdir
  487.   #endif
  488.   
  489.   #ifndef CVS_STAT
  490. ! #define CVS_STAT amiga_stat
  491.   #endif
  492.   
  493.   /* Open question: should CVS_STAT be lstat by default?  We need
  494.      to use lstat in order to handle symbolic links correctly with
  495.      the PreservePermissions option. -twp */
  496.   #ifndef CVS_LSTAT
  497. ! #define CVS_LSTAT amiga_stat
  498.   #endif
  499.   
  500.   #ifndef CVS_UNLINK
  501. ! #define CVS_UNLINK amiga_unlink
  502.   #endif
  503.   
  504.   /* Wildcard matcher.  Should be case-insensitive if the system is.  */
  505. ***************
  506. *** 476,481 ****
  507. --- 476,489 ----
  508.   extern void fnfold (char *FILENAME);
  509.   
  510.   #endif /* defined (__CYGWIN32__) || defined (WIN32) */
  511. + #ifdef AMIGA
  512. + #include "amiga.h"
  513. + #define FOLD_FN_CHAR(c) amiga_fold_fn_char(c)
  514. + #define FILENAMES_CASE_INSENSITIVE 1
  515. + #define ISDIRSEP(c) ((c) == ':' || (c) == '/')
  516. + #endif /* AMIGA */
  517.   
  518.   /* Some file systems are case-insensitive.  If FOLD_FN_CHAR is
  519.      #defined, it maps the character C onto its "canonical" form.  In a
  520. Index: lib/xgetwd.c
  521. ===================================================================
  522. RCS file: /cvs/ccvs/lib/xgetwd.c,v
  523. retrieving revision 1.5
  524. diff -c -r1.5 xgetwd.c
  525. *** lib/xgetwd.c    29 Nov 1997 22:52:35 -0000    1.5
  526. --- lib/xgetwd.c    9 Nov 2002 18:48:04 -0000
  527. ***************
  528. *** 29,36 ****
  529. --- 29,41 ----
  530.   /* Amount by which to increase buffer size when allocating more space. */
  531.   #define PATH_INCR 32
  532.   
  533. + #ifdef AMIGA
  534. + char *xmalloc(size_t);
  535. + char *xrealloc(void *ptr, size_t bytes);
  536. + #else
  537.   char *xmalloc ();
  538.   char *xrealloc ();
  539. + #endif /* AMIGA */
  540.   
  541.   /* Return the current directory, newly allocated, arbitrarily long.
  542.      Return NULL and set errno on error. */
  543. Index: lib/xtime.h
  544. ===================================================================
  545. RCS file: /cvs/ccvs/lib/xtime.h,v
  546. retrieving revision 1.1
  547. diff -c -r1.1 xtime.h
  548. *** lib/xtime.h    15 Feb 2001 02:53:07 -0000    1.1
  549. --- lib/xtime.h    9 Nov 2002 18:48:04 -0000
  550. ***************
  551. *** 27,32 ****
  552. --- 27,36 ----
  553.   #   endif /* !HAVE_SYS_TIME_H */
  554.   # endif /* !TIME_WITH_SYS_TIME */
  555.   
  556. + # ifdef timezone
  557. + #   undef timezone /* needed for sgi */
  558. + # endif /* timezone */
  559.   # ifdef HAVE_SYS_TIMEB_H
  560.   #   include <sys/timeb.h>
  561.   # else /* HAVE_SYS_TIMEB_H */
  562. ***************
  563. *** 45,54 ****
  564.       short        dstflag;    /* Field not used        */
  565.   };
  566.   # endif /* !HAVE_SYS_TIMEB_H */
  567. - # ifdef timezone
  568. - #   undef timezone /* needed for sgi */
  569. - # endif /* timezone */
  570.   
  571.   # if !defined(HAVE_FTIME) && !defined(HAVE_TIMEZONE)
  572.   extern long timezone;
  573. --- 49,54 ----
  574. Index: src/admin.c
  575. ===================================================================
  576. RCS file: /cvs/ccvs/src/admin.c,v
  577. retrieving revision 1.75
  578. diff -c -r1.75 admin.c
  579. *** src/admin.c    30 Nov 2001 18:37:24 -0000    1.75
  580. --- src/admin.c    9 Nov 2002 18:48:54 -0000
  581. ***************
  582. *** 147,153 ****
  583. --- 147,155 ----
  584.       int err;
  585.   #ifdef CVS_ADMIN_GROUP
  586.       struct group *grp;
  587. + #ifndef AMIGA
  588.       struct group *getgrnam();
  589. + #endif /* AMIGA */
  590.   #endif
  591.       struct admin_data admin_data;
  592.       int c;
  593. Index: src/buffer.c
  594. ===================================================================
  595. RCS file: /cvs/ccvs/src/buffer.c,v
  596. retrieving revision 1.18
  597. diff -c -r1.18 buffer.c
  598. *** src/buffer.c    9 Aug 2001 19:26:35 -0000    1.18
  599. --- src/buffer.c    9 Nov 2002 18:48:56 -0000
  600. ***************
  601. *** 1405,1411 ****
  602. --- 1405,1417 ----
  603.       }
  604.   
  605.   # ifdef SHUTDOWN_SERVER
  606. + #ifdef AMIGA
  607. +     if (current_parsed_root->method == server_method)
  608. +         SHUTDOWN_SERVER_INPUT(fileno(bc->fp));
  609. +   else
  610. + #else
  611.       if (current_parsed_root->method != server_method)
  612. + #endif /* AMIGA */
  613.   # endif
  614.   # ifndef NO_SOCKET_TO_FD
  615.       {
  616. ***************
  617. *** 1433,1439 ****
  618. --- 1439,1449 ----
  619.        * SHUTDOWN_SERVER_OUTPUT
  620.        */
  621.       if (current_parsed_root->method == server_method)
  622. + #ifdef AMIGA
  623. +         SHUTDOWN_SERVER_OUTPUT(fileno(bc->fp));
  624. + #else
  625.           SHUTDOWN_SERVER ( fileno (bc->fp) );
  626. + #endif /* AMIGA */
  627.       else
  628.   # endif
  629.   # ifndef NO_SOCKET_TO_FD
  630. Index: src/client.c
  631. ===================================================================
  632. RCS file: /cvs/ccvs/src/client.c,v
  633. retrieving revision 1.309
  634. diff -c -r1.309 client.c
  635. *** src/client.c    9 Aug 2001 20:27:26 -0000    1.309
  636. --- src/client.c    9 Nov 2002 18:49:06 -0000
  637. ***************
  638. *** 798,804 ****
  639. --- 798,810 ----
  640.   
  641.       /* shutdown() socket */
  642.   # ifdef SHUTDOWN_SERVER
  643. + #ifdef AMIGA
  644. +     if (current_parsed_root->method == server_method)
  645. +         SHUTDOWN_SERVER_INPUT(n->socket);
  646. +   else
  647. + #else
  648.       if (current_parsed_root->method != server_method)
  649. + #endif /* AMIGA */
  650.   # endif
  651.       if (shutdown (n->socket, 0) < 0)
  652.       {
  653. ***************
  654. *** 815,821 ****
  655. --- 821,831 ----
  656.        * SHUTDOWN_SERVER_OUTPUT
  657.        */
  658.       if (current_parsed_root->method == server_method)
  659. + #ifdef AMIGA
  660. +         SHUTDOWN_SERVER_OUTPUT(n->socket);
  661. + #else
  662.           SHUTDOWN_SERVER (n->socket);
  663. + #endif /* AMIGA */
  664.       else
  665.   # endif
  666.       if (shutdown (n->socket, 1) < 0)
  667. ***************
  668. *** 3484,3490 ****
  669.   
  670.       memcpy (buf, data, nread);
  671.   
  672. !     return nread;
  673.   }
  674.   
  675.   /*
  676. --- 3494,3500 ----
  677.   
  678.       memcpy (buf, data, nread);
  679.   
  680. !     return (size_t)nread; /* AMiGA */
  681.   }
  682.   
  683.   /*
  684. ***************
  685. *** 3789,3797 ****
  686. --- 3799,3811 ----
  687.          same.  */
  688.       if (tofd == fromfd)
  689.       {
  690. + #ifdef AMIGA
  691. +        fprintf(stderr,"HELP! dup() called!\n");
  692. + #else
  693.           fromfd = dup (tofd);
  694.           if (fromfd < 0)
  695.           error (1, errno, "cannot dup net connection");
  696. + #endif /* AMIGA */
  697.       }
  698.   
  699.       /* These will use binary mode on systems which have it.  */
  700. ***************
  701. *** 3813,3819 ****
  702.                              (BUFMEMERRPROC) NULL);
  703.       }
  704.   }
  705.   
  706.   
  707.   /* Connect to a forked server process. */
  708. --- 3827,3832 ----
  709. Index: src/cvs.h
  710. ===================================================================
  711. RCS file: /cvs/ccvs/src/cvs.h,v
  712. retrieving revision 1.225
  713. diff -c -r1.225 cvs.h
  714. *** src/cvs.h    24 Aug 2001 17:47:02 -0000    1.225
  715. --- src/cvs.h    9 Nov 2002 18:49:11 -0000
  716. ***************
  717. *** 58,63 ****
  718. --- 58,67 ----
  719.   #include <strings.h>
  720.   #endif
  721.   
  722. + #ifdef AMIGA
  723. + #include "amiga.h"
  724. + #endif /* AMIGA */
  725.   #ifdef SERVER_SUPPORT
  726.   /* If the system doesn't provide strerror, it won't be declared in
  727.      string.h.  */
  728. Index: src/cvsrc.c
  729. ===================================================================
  730. RCS file: /cvs/ccvs/src/cvsrc.c,v
  731. retrieving revision 1.20
  732. diff -c -r1.20 cvsrc.c
  733. *** src/cvsrc.c    23 Dec 1998 15:15:00 -0000    1.20
  734. --- src/cvsrc.c    9 Nov 2002 18:49:12 -0000
  735. ***************
  736. *** 75,80 ****
  737. --- 75,83 ----
  738.   
  739.       homeinit = (char *) xmalloc (strlen (homedir) + strlen (cvsrc) + 10);
  740.       strcpy (homeinit, homedir);
  741. +     #ifdef AMIGA
  742. +     if(homedir[strlen(homedir)-1] != ':')
  743. +     #endif /* AMIGA */
  744.       strcat (homeinit, "/");
  745.       strcat (homeinit, cvsrc);
  746.   
  747. Index: src/entries.c
  748. ===================================================================
  749. RCS file: /cvs/ccvs/src/entries.c,v
  750. retrieving revision 1.46
  751. diff -c -r1.46 entries.c
  752. *** src/entries.c    9 Mar 2001 18:21:40 -0000    1.46
  753. --- src/entries.c    9 Nov 2002 18:49:15 -0000
  754. ***************
  755. *** 340,345 ****
  756. --- 340,348 ----
  757.       if ((cp = strchr (user, '/')) == NULL)
  758.           continue;
  759.       *cp++ = '\0';
  760. + #ifdef AMIGA
  761. +   if(!(*user)) continue; /* AMIGA: This is to prevent trouble with "D/////" entries */
  762. + #endif
  763.       vn = cp;
  764.       if ((cp = strchr (vn, '/')) == NULL)
  765.           continue;
  766. Index: src/filesubr.c
  767. ===================================================================
  768. RCS file: /cvs/ccvs/src/filesubr.c,v
  769. retrieving revision 1.54
  770. diff -c -r1.54 filesubr.c
  771. *** src/filesubr.c    25 May 2001 18:43:15 -0000    1.54
  772. --- src/filesubr.c    9 Nov 2002 18:49:18 -0000
  773. ***************
  774. *** 110,115 ****
  775. --- 110,119 ----
  776.       t.actime = sb.st_atime;
  777.       t.modtime = sb.st_mtime;
  778.       (void) utime (to, &t);
  779. +     #ifdef AMIGA
  780. +     chmod((char *)to, sb.st_mode);
  781. +     #endif /* AMIGA */
  782.   }
  783.   
  784.   /* FIXME-krp: these functions would benefit from caching the char * &
  785. ***************
  786. *** 426,431 ****
  787. --- 430,436 ----
  788.    * removal of all of the files in the directory.  Return -1 on error
  789.    * (in which case errno is set).
  790.    */
  791. + #ifndef AMIGA
  792.   int
  793.   unlink_file_dir (f)
  794.       const char *f;
  795. ***************
  796. *** 466,471 ****
  797. --- 471,477 ----
  798.   
  799.       return CVS_UNLINK (f);
  800.   }
  801. + #endif /* AMIGA */
  802.   
  803.   /* Remove a directory and everything it contains.  Returns 0 for
  804.    * success, -1 for failure (in which case errno is set).
  805. ***************
  806. *** 579,585 ****
  807.       nchars -= nread;
  808.       } while (nchars != 0);
  809.   
  810. !     return bp - buf;
  811.   } 
  812.   
  813.       
  814. --- 585,591 ----
  815.       nchars -= nread;
  816.       } while (nchars != 0);
  817.   
  818. !     return (size_t)(bp - buf); /* AMiGA */
  819.   } 
  820.   
  821.       
  822. ***************
  823. *** 620,625 ****
  824. --- 626,632 ----
  825.       return result;
  826.       }
  827.   
  828. + #ifndef AMIGA
  829.       /* If FILE1 and FILE2 are devices, they are equal if their device
  830.          numbers match. */
  831.       if (S_ISBLK (sb1.st_mode) || S_ISCHR (sb1.st_mode))
  832. ***************
  833. *** 634,639 ****
  834. --- 641,647 ----
  835.              file1, file2);
  836.   #endif
  837.       }
  838. + #endif /* AMIGA */
  839.   
  840.       if ((fd1 = open (file1, O_RDONLY)) < 0)
  841.       error (1, errno, "cannot open file %s for comparing", file1);
  842. ***************
  843. *** 683,688 ****
  844. --- 691,697 ----
  845.       return (ret);
  846.   }
  847.   
  848. + #ifndef AMIGA
  849.   /* Generate a unique temporary filename.  Returns a pointer to a newly
  850.    * malloc'd string containing the name.  Returns successfully or not at
  851.    * all.
  852. ***************
  853. *** 706,711 ****
  854. --- 715,721 ----
  855.       error (0, errno, "Failed to close temporary file %s", fn);
  856.       return fn;
  857.   }
  858. + #endif /* AMIGA */
  859.   
  860.   /* Generate a unique temporary filename and return an open file stream
  861.    * to the truncated file by that name
  862. ***************
  863. *** 738,743 ****
  864. --- 748,754 ----
  865.    * NFS locking thing, but until I hear of more problems, I'm not going to
  866.    * bother.
  867.    */
  868. + #ifndef AMIGA
  869.   FILE *cvs_temp_file (filename)
  870.       char **filename;
  871.   {
  872. ***************
  873. *** 844,850 ****
  874. --- 855,863 ----
  875.       *filename = fn;
  876.       return fp;
  877.   }
  878. + #endif /* AMIGA */
  879.   
  880. + #ifndef AMIGA
  881.   /* Return non-zero iff FILENAME is absolute.
  882.      Trivial under Unix, but more complicated under other systems.  */
  883.   int
  884. ***************
  885. *** 853,858 ****
  886. --- 866,872 ----
  887.   {
  888.       return filename[0] == '/';
  889.   }
  890. + #endif /* AMIGA */
  891.   
  892.   /*
  893.    * Return a string (dynamically allocated) with the name of the file to which
  894. ***************
  895. *** 892,898 ****
  896.       return tfile;
  897.   }
  898.   
  899.   /* Return a pointer into PATH's last component.  */
  900.   char *
  901.   last_component (path)
  902. --- 906,912 ----
  903.       return tfile;
  904.   }
  905.   
  906. ! #ifndef AMIGA
  907.   /* Return a pointer into PATH's last component.  */
  908.   char *
  909.   last_component (path)
  910. ***************
  911. *** 905,910 ****
  912. --- 919,925 ----
  913.       else
  914.           return path;
  915.   }
  916. + #endif /* AMIGA */
  917.   
  918.   /* Return the home directory.  Returns a pointer to storage
  919.      managed by this function or its callees (currently getenv).
  920. ***************
  921. *** 954,959 ****
  922. --- 969,975 ----
  923.       return home;
  924.   }
  925.   
  926. + #ifndef AMIGA
  927.   /* See cvs.h for description.  On unix this does nothing, because the
  928.      shell expands the wildcards.  */
  929.   void
  930. ***************
  931. *** 969,974 ****
  932. --- 985,991 ----
  933.       for (i = 0; i < argc; ++i)
  934.       (*pargv)[i] = xstrdup (argv[i]);
  935.   }
  936. + #endif /* AMIGA */
  937.   
  938.   #ifdef SERVER_SUPPORT
  939.   /* Case-insensitive string compare.  I know that some systems
  940. Index: src/hash.c
  941. ===================================================================
  942. RCS file: /cvs/ccvs/src/hash.c,v
  943. retrieving revision 1.32
  944. diff -c -r1.32 hash.c
  945. *** src/hash.c    9 Jun 2000 20:54:01 -0000    1.32
  946. --- src/hash.c    9 Nov 2002 18:49:20 -0000
  947. ***************
  948. *** 21,28 ****
  949.   
  950.   /* hash function */
  951.   static int
  952.   hashp (key)
  953. !     const char *key;
  954.   {
  955.       unsigned int h = 0;
  956.       unsigned int g;
  957. --- 21,32 ----
  958.   
  959.   /* hash function */
  960.   static int
  961. + #ifdef AMIGA
  962. + hashp (const char *key)
  963. + #else
  964.   hashp (key)
  965. !     const char *key;
  966. ! #endif /* AMIGA */
  967.   {
  968.       unsigned int h = 0;
  969.       unsigned int g;
  970. ***************
  971. *** 38,44 ****
  972.           h = (h ^ (g >> 24)) ^ g;
  973.       }
  974.   
  975. !     return (h % HASHSIZE);
  976.   }
  977.   
  978.   /*
  979. --- 42,48 ----
  980.           h = (h ^ (g >> 24)) ^ g;
  981.       }
  982.   
  983. !     return (int)(h % HASHSIZE); /* AMiGA */
  984.   }
  985.   
  986.   /*
  987. ***************
  988. *** 184,190 ****
  989.   freenode_mem (p)
  990.       Node *p;
  991.   {
  992. !     if (p->delproc != (void (*) ()) NULL)
  993.       p->delproc (p);            /* call the specified delproc */
  994.       else
  995.       {
  996. --- 188,194 ----
  997.   freenode_mem (p)
  998.       Node *p;
  999.   {
  1000. !     if (p->delproc != (void (*) (void *)) NULL) /* AMiGA */
  1001.       p->delproc (p);            /* call the specified delproc */
  1002.       else
  1003.       {
  1004. ***************
  1005. *** 196,202 ****
  1006.   
  1007.       /* to be safe, re-initialize these */
  1008.       p->key = p->data = (char *) NULL;
  1009. !     p->delproc = (void (*) ()) NULL;
  1010.   }
  1011.   
  1012.   /*
  1013. --- 200,206 ----
  1014.   
  1015.       /* to be safe, re-initialize these */
  1016.       p->key = p->data = (char *) NULL;
  1017. !     p->delproc = (void (*) (void *)) NULL; /* AMiGA */
  1018.   }
  1019.   
  1020.   /*
  1021. Index: src/hash.h
  1022. ===================================================================
  1023. RCS file: /cvs/ccvs/src/hash.h,v
  1024. retrieving revision 1.14
  1025. diff -c -r1.14 hash.h
  1026. *** src/hash.h    9 Jun 2000 20:54:01 -0000    1.14
  1027. --- src/hash.h    9 Nov 2002 18:49:20 -0000
  1028. ***************
  1029. *** 11,16 ****
  1030. --- 11,20 ----
  1031.    */
  1032.   #define HASHSIZE    151
  1033.   
  1034. + #ifdef AMIGA
  1035. + #undef NT_UNKNOWN
  1036. + #endif /* AMIGA */
  1037.   /*
  1038.    * Types of nodes
  1039.    */
  1040. ***************
  1041. *** 31,37 ****
  1042.       struct node *hashprev;
  1043.       char *key;
  1044.       char *data;
  1045. !     void (*delproc) ();
  1046.   };
  1047.   typedef struct node Node;
  1048.   
  1049. --- 35,41 ----
  1050.       struct node *hashprev;
  1051.       char *key;
  1052.       char *data;
  1053. !     void (*delproc) (void *); /* AMiGA */
  1054.   };
  1055.   typedef struct node Node;
  1056.   
  1057. Index: src/ignore.c
  1058. ===================================================================
  1059. RCS file: /cvs/ccvs/src/ignore.c,v
  1060. retrieving revision 1.37
  1061. diff -c -r1.37 ignore.c
  1062. *** src/ignore.c    4 Apr 2001 16:52:55 -0000    1.37
  1063. --- src/ignore.c    9 Nov 2002 18:49:23 -0000
  1064. ***************
  1065. *** 90,96 ****
  1066.       if (home_dir)
  1067.       {
  1068.       char *file = xmalloc (strlen (home_dir) + sizeof (CVSDOTIGNORE) + 10);
  1069. !     (void) sprintf (file, "%s/%s", home_dir, CVSDOTIGNORE);
  1070.       ign_add_file (file, 0);
  1071.       free (file);
  1072.       }
  1073. --- 90,100 ----
  1074.       if (home_dir)
  1075.       {
  1076.       char *file = xmalloc (strlen (home_dir) + sizeof (CVSDOTIGNORE) + 10);
  1077. !   #ifdef AMIGA
  1078. !     if(home_dir[strlen(home_dir)-1] == ':') sprintf (file, "%s%s", home_dir, CVSDOTIGNORE);
  1079. !   else
  1080. !   #endif /* AMIGA */
  1081. !   (void) sprintf (file, "%s/%s", home_dir, CVSDOTIGNORE);
  1082.       ign_add_file (file, 0);
  1083.       free (file);
  1084.       }
  1085. Index: src/login.c
  1086. ===================================================================
  1087. RCS file: /cvs/ccvs/src/login.c,v
  1088. retrieving revision 1.67
  1089. diff -c -r1.67 login.c
  1090. *** src/login.c    6 Sep 2001 16:18:29 -0000    1.67
  1091. --- src/login.c    9 Nov 2002 18:49:29 -0000
  1092. ***************
  1093. *** 26,33 ****
  1094. --- 26,35 ----
  1095.      varadic, believe it or not).  On Cray, getpass will be declared
  1096.      in either stdlib.h or unistd.h.  */
  1097.   #ifndef _CRAY
  1098. + #ifndef AMIGA
  1099.   extern char *GETPASS ();
  1100.   #endif
  1101. + #endif
  1102.   
  1103.   #ifndef CVS_PASSWORD_FILE 
  1104.   #define CVS_PASSWORD_FILE ".cvspass"
  1105. ***************
  1106. *** 73,78 ****
  1107. --- 75,83 ----
  1108.          a legal filename but foo:[bar].cvspass is.  A more clean solution would
  1109.          be something more along the lines of a "join a directory to a filename"
  1110.          kind of thing....  */
  1111. +     #ifdef AMIGA
  1112. +     if(homedir[strlen(homedir)-1] != ':')
  1113. +     #endif /* AMIGA */
  1114.       strcat (passfile, "/");
  1115.   #endif
  1116.       strcat (passfile, CVS_PASSWORD_FILE);
  1117. Index: src/main.c
  1118. ===================================================================
  1119. RCS file: /cvs/ccvs/src/main.c,v
  1120. retrieving revision 1.170
  1121. diff -c -r1.170 main.c
  1122. *** src/main.c    13 Mar 2002 19:31:14 -0000    1.170
  1123. --- src/main.c    9 Nov 2002 18:49:31 -0000
  1124. ***************
  1125. *** 18,24 ****
  1126. --- 18,26 ----
  1127.   #ifdef HAVE_WINSOCK_H
  1128.   #include <winsock.h>
  1129.   #else
  1130. + #ifndef AMIGA
  1131.   extern int gethostname ();
  1132. + #endif /* AMIGA */
  1133.   #endif
  1134.   
  1135.   char *program_name;
  1136. ***************
  1137. *** 99,105 ****
  1138.       char *nick1;
  1139.       char *nick2;
  1140.       
  1141. !     int (*func) ();        /* Function takes (argc, argv) arguments. */
  1142.       unsigned long attr;        /* Attributes. */
  1143.   } cmds[] =
  1144.   
  1145. --- 101,111 ----
  1146.       char *nick1;
  1147.       char *nick2;
  1148.       
  1149. !     #ifdef AMIGA
  1150. !     int (*func) (int argc, char ** argv);
  1151. !     #else
  1152. !     int (*func) ();     /* Function takes (argc, argv) arguments. */
  1153. !     #endif /* AMIGA */
  1154.       unsigned long attr;        /* Attributes. */
  1155.   } cmds[] =
  1156.   
  1157. ***************
  1158. *** 544,552 ****
  1159. --- 550,566 ----
  1160.           (void) fputs ("\n", stdout);
  1161.           version (0, (char **) NULL);    
  1162.           (void) fputs ("\n", stdout);
  1163. + #ifndef AMIGA
  1164.           (void) fputs ("\
  1165.   Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\
  1166.                           Jeff Polk, and other authors\n", stdout);
  1167. + #else
  1168. +         (void) fputs ("\
  1169. + Copyright (c) 1989-2001 Brian Berliner, david d `zoo' zuhn, \n\
  1170. +                         Jeff Polk, and other authors\n\
  1171. + ported by:\n\
  1172. + Copyright (c) 2001-2002 Olaf `olsen' Barthel and Jens Langner\n", stdout);
  1173. + #endif /* AMIGA */
  1174.           (void) fputs ("\n", stdout);
  1175.           (void) fputs ("CVS may be copied only under the terms of the GNU General Public License,\n", stdout);
  1176.           (void) fputs ("a copy of which can be found with the CVS distribution kit.\n", stdout);
  1177. Index: src/parseinfo.c
  1178. ===================================================================
  1179. RCS file: /cvs/ccvs/src/parseinfo.c,v
  1180. retrieving revision 1.36
  1181. diff -c -r1.36 parseinfo.c
  1182. *** src/parseinfo.c    24 Aug 2001 17:47:02 -0000    1.36
  1183. --- src/parseinfo.c    9 Nov 2002 18:49:36 -0000
  1184. ***************
  1185. *** 44,49 ****
  1186. --- 44,61 ----
  1187.       return (1);
  1188.       }
  1189.   
  1190. +     /* This should be interesting. If this is a remote repository,
  1191. +      * then trying to open it locally is not going to provide for
  1192. +      * a lot of useful information. So we're going to skip it. It's
  1193. +      * causing trouble with the Amiga implementation, too.
  1194. +      */
  1195. +     #ifdef AMIGA
  1196. +     {
  1197. +     if (current_parsed_root->isremote)
  1198. +         return (1);
  1199. +     }
  1200. +     #endif /* AMIGA */
  1201.       /* find the info file and open it */
  1202.       infopath = xmalloc (strlen (current_parsed_root->directory)
  1203.               + strlen (infofile)
  1204. Index: src/root.c
  1205. ===================================================================
  1206. RCS file: /cvs/ccvs/src/root.c,v
  1207. retrieving revision 1.55
  1208. diff -c -r1.55 root.c
  1209. *** src/root.c    5 Jul 2001 19:11:39 -0000    1.55
  1210. --- src/root.c    9 Nov 2002 18:49:52 -0000
  1211. ***************
  1212. *** 419,424 ****
  1213. --- 419,431 ----
  1214.       }
  1215.       else
  1216.       {
  1217. + #ifdef AMIGA
  1218. +   /* On Amiga-systems a valid path could have a ":" which would cause the normal
  1219. +      cvs to think that this is a port specification, so therefore anything that doesn`t
  1220. +      start with a valid :method: specification is a local_method per default.
  1221. +   */
  1222. +   newroot->method = local_method;
  1223. + #else
  1224.       /* If the method isn't specified, assume
  1225.          SERVER_METHOD/EXT_METHOD if the string looks like a relative path or
  1226.          LOCAL_METHOD otherwise.  */
  1227. ***************
  1228. *** 430,435 ****
  1229. --- 437,443 ----
  1230.                 ? ext_method
  1231.   /*#endif*/
  1232.                 : local_method);
  1233. + #endif /* AMIGA */
  1234.       }
  1235.   
  1236.   #ifdef CLIENT_SUPPORT
  1237. Index: src/run.c
  1238. ===================================================================
  1239. RCS file: /cvs/ccvs/src/run.c,v
  1240. retrieving revision 1.33
  1241. diff -c -r1.33 run.c
  1242. *** src/run.c    24 Jan 2001 03:35:10 -0000    1.33
  1243. --- src/run.c    9 Nov 2002 18:49:52 -0000
  1244. ***************
  1245. *** 98,103 ****
  1246. --- 98,182 ----
  1247.       const char *sterr;
  1248.       int flags;
  1249.   {
  1250. + #ifdef AMIGA
  1251. +     int len,total_len,quotes,escape,result,i,j;
  1252. +     char * s;
  1253. +     char * arg;
  1254. +     char * command;
  1255. +     if (noexec && (flags & RUN_REALLY) == 0)
  1256. +    return (0);
  1257. +     total_len = 0;
  1258. +     for (i = 0; i < run_argc; i++)
  1259. +     {
  1260. +         arg = run_argv[i];
  1261. +         len = strlen(arg);
  1262. +         quotes = 0;
  1263. +         for(j = 0 ; j < len ; j++)
  1264. +         {
  1265. +            if(arg[j] == ' ' && quotes == 0)
  1266. +                quotes = 2;
  1267. +            else if (arg[j] == '\"')
  1268. +                total_len++;
  1269. +         }
  1270. +         total_len += len + quotes + 1;
  1271. +     }
  1272. +     command = malloc(total_len+1);
  1273. +     if(command == NULL)
  1274. +     {
  1275. +         errno = ENOMEM;
  1276. +         return(-1);
  1277. +     }
  1278. +     s = command;
  1279. +     for (i = 0; i < run_argc; i++)
  1280. +     {
  1281. +         arg = run_argv[i];
  1282. +         len = strlen(arg);
  1283. +         quotes = escape = 0;
  1284. +         for(j = 0 ; j < len ; j++)
  1285. +         {
  1286. +            if(arg[j] == ' ')
  1287. +                quotes = 1;
  1288. +            else if (arg[j] == '\"')
  1289. +                escape = 1;
  1290. +            if(quotes == 1 && escape == 1)
  1291. +                break;
  1292. +         }
  1293. +         if(quotes)
  1294. +             (*s++) = '\"';
  1295. +         for(j = 0 ; j < len ; j++)
  1296. +         {
  1297. +             if(arg[j] == '\"')
  1298. +                 (*s++) = '*';
  1299. +             (*s++) = arg[j];
  1300. +         }
  1301. +         if(quotes)
  1302. +             (*s++) = '\"';
  1303. +         if(i < run_argc-1)
  1304. +           (*s++) = ' ';
  1305. +     }
  1306. +     (*s) = '\0';
  1307. +     result = system(command);
  1308. +     free(command);
  1309. +     return(0);
  1310. + #else
  1311.       int shin, shout, sherr;
  1312.       int mode_out, mode_err;
  1313.       int status;
  1314. ***************
  1315. *** 345,350 ****
  1316. --- 424,431 ----
  1317.       if (rerrno)
  1318.       errno = rerrno;
  1319.       return (rc);
  1320. + #endif /* AMIGA */
  1321.   }
  1322.   
  1323.   void
  1324. ***************
  1325. *** 402,407 ****
  1326. --- 483,495 ----
  1327.        int *tofdp;
  1328.        int *fromfdp;
  1329.   {
  1330. + #ifdef AMIGA
  1331. +     int pid;
  1332. +     pid = amiga_piped_child(command,tofdp,fromfdp);
  1333. +     return(pid);
  1334. + #else
  1335.       int pid;
  1336.       int to_child_pipe[2];
  1337.       int from_child_pipe[2];
  1338. ***************
  1339. *** 447,452 ****
  1340. --- 535,541 ----
  1341.       *tofdp = to_child_pipe[1];
  1342.       *fromfdp = from_child_pipe[0];
  1343.       return pid;
  1344. + #endif /* AMIGA */
  1345.   }
  1346.   
  1347.   
  1348. ***************
  1349. *** 454,461 ****
  1350. --- 543,552 ----
  1351.   close_on_exec (fd)
  1352.        int fd;
  1353.   {
  1354. + #ifndef AMIGA
  1355.   #ifdef F_SETFD
  1356.       if (fcntl (fd, F_SETFD, 1))
  1357.       error (1, errno, "can't set close-on-exec flag on %d", fd);
  1358.   #endif
  1359. + #endif /* AMIGA */
  1360.   }
  1361. Index: src/subr.c
  1362. ===================================================================
  1363. RCS file: /cvs/ccvs/src/subr.c,v
  1364. retrieving revision 1.71
  1365. diff -c -r1.71 subr.c
  1366. *** src/subr.c    7 Aug 2001 15:35:32 -0000    1.71
  1367. --- src/subr.c    9 Nov 2002 18:50:25 -0000
  1368. ***************
  1369. *** 742,748 ****
  1370.          But that would require editing each filesubr.c and so the
  1371.          expedient hack seems to be looking at HAVE_READLINK.  */
  1372.       newname = xreadlink (*filename);
  1373. -     
  1374.       if (isabsolute (newname))
  1375.       {
  1376.           free (*filename);
  1377. --- 742,747 ----
  1378. Index: src/wrapper.c
  1379. ===================================================================
  1380. RCS file: /cvs/ccvs/src/wrapper.c,v
  1381. retrieving revision 1.28
  1382. diff -c -r1.28 wrapper.c
  1383. *** src/wrapper.c    23 Oct 2001 21:07:05 -0000    1.28
  1384. --- src/wrapper.c    9 Nov 2002 18:50:32 -0000
  1385. ***************
  1386. *** 128,134 ****
  1387.       char *file;
  1388.   
  1389.       file = xmalloc (strlen (homedir) + sizeof (CVSDOTWRAPPER) + 10);
  1390. !     (void) sprintf (file, "%s/%s", homedir, CVSDOTWRAPPER);
  1391.       if (isfile (file))
  1392.       {
  1393.           wrap_add_file (file, 0);
  1394. --- 128,138 ----
  1395.       char *file;
  1396.   
  1397.       file = xmalloc (strlen (homedir) + sizeof (CVSDOTWRAPPER) + 10);
  1398. !   #ifdef AMIGA
  1399. !     if(homedir[strlen(homedir)-1] == ':') sprintf (file, "%s%s", homedir, CVSDOTWRAPPER);
  1400. !   else
  1401. !   #endif /* AMIGA */
  1402. !   (void) sprintf(file, "%s/%s", homedir, CVSDOTWRAPPER);
  1403.       if (isfile (file))
  1404.       {
  1405.           wrap_add_file (file, 0);
  1406. Index: zlib/zconf.h
  1407. ===================================================================
  1408. RCS file: /cvs/ccvs/zlib/zconf.h,v
  1409. retrieving revision 1.1.1.3
  1410. diff -c -r1.1.1.3 zconf.h
  1411. *** zlib/zconf.h    11 Mar 2002 22:11:55 -0000    1.1.1.3
  1412. --- zlib/zconf.h    9 Nov 2002 18:51:05 -0000
  1413. ***************
  1414. *** 276,279 ****
  1415. --- 276,283 ----
  1416.   #   pragma map(inflate_trees_free,"INTRFR")
  1417.   #endif
  1418.   
  1419. + #ifdef AMIGA
  1420. + #include "amiga.h"
  1421. + #endif /* AMIGA */
  1422.   #endif /* _ZCONF_H */
  1423.